from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField
from wtforms.validators import DataRequired, Email


class Register_Form(FlaskForm):
    username = StringField(u'用户名', validators=[DataRequired()])
    password = PasswordField(u'密码', validators=[DataRequired()])
    email = StringField(u'邮箱', validators=[Email(), DataRequired()])
    submit = SubmitField(u'注册')


class Login_Form(FlaskForm):
    email = StringField(u'邮箱', validators=[Email(), DataRequired()])
    password = PasswordField(u'密码', validators=[DataRequired()])
    submit = SubmitField(u'登陆')
